<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>科技未来 - 新员工注册</title>
    <style>
        :root {
            --primary-color: #2563eb;
            --primary-hover: #1d4ed8;
            --secondary-color: #10b981;
            --dark-color: #1e293b;
            --light-color: #f8fafc;
            --gray-color: #94a3b8;
            --border-radius: 8px;
            --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
        }

        body {
            background-color: #f1f5f9;
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            color: var(--dark-color);
        }

        .register-container {
            display: flex;
            width: 900px;
            background-color: white;
            border-radius: var(--border-radius);
            overflow: hidden;
            box-shadow: var(--box-shadow);
        }

        .register-left {
            flex: 1;
            padding: 60px 40px;
            background: linear-gradient(135deg, #2563eb, #3b82f6);
            color: white;
            display: flex;
            flex-direction: column;
            justify-content: center;
            position: relative;
            overflow: hidden;
        }

        .register-left::before {
            content: "";
            position: absolute;
            top: -50px;
            right: -50px;
            width: 200px;
            height: 200px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.1);
        }

        .register-left::after {
            content: "";
            position: absolute;
            bottom: -80px;
            right: -30px;
            width: 250px;
            height: 250px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.1);
        }

        .register-left h1 {
            font-size: 2.2rem;
            margin-bottom: 1rem;
            font-weight: 600;
            position: relative;
            z-index: 1;
        }

        .register-left p {
            margin-bottom: 1.5rem;
            line-height: 1.6;
            opacity: 0.9;
            position: relative;
            z-index: 1;
        }

        .features-list {
            margin-top: 2rem;
            position: relative;
            z-index: 1;
        }

        .feature-item {
            display: flex;
            align-items: center;
            margin-bottom: 1rem;
        }

        .feature-icon {
            width: 24px;
            height: 24px;
            background-color: rgba(255, 255, 255, 0.2);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-right: 12px;
        }

        .company-logo {
            width: 120px;
            margin-bottom: 2rem;
            position: relative;
            z-index: 1;
        }

        .register-right {
            flex: 1;
            padding: 60px 40px;
            display: flex;
            flex-direction: column;
            justify-content: center;
        }

        .register-right h2 {
            font-size: 1.8rem;
            margin-bottom: 1.5rem;
            color: var(--dark-color);
        }

        .form-group {
            margin-bottom: 1.2rem;
        }

        .form-group label {
            display: block;
            margin-bottom: 0.5rem;
            font-weight: 500;
            color: var(--dark-color);
            font-size: 0.95rem;
        }

        .form-control {
            width: 100%;
            padding: 12px 16px;
            border: 1px solid #e2e8f0;
            border-radius: var(--border-radius);
            font-size: 1rem;
            transition: border-color 0.3s;
        }

        .form-control:focus {
            outline: none;
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
        }

        .password-strength {
            margin-top: 0.5rem;
            height: 4px;
            background-color: #e2e8f0;
            border-radius: 2px;
            overflow: hidden;
        }

        .strength-bar {
            height: 100%;
            width: 0;
            background-color: #ef4444;
            transition: width 0.3s, background-color 0.3s;
        }

        .btn {
            display: inline-block;
            padding: 12px 24px;
            background-color: var(--primary-color);
            color: white;
            border: none;
            border-radius: var(--border-radius);
            font-size: 1rem;
            font-weight: 500;
            cursor: pointer;
            transition: background-color 0.3s;
            width: 100%;
            margin-top: 0.5rem;
        }

        .btn:hover {
            background-color: var(--primary-hover);
        }

        .btn-secondary {
            background-color: var(--secondary-color);
        }

        .btn-secondary:hover {
            background-color: #0d9b6c;
        }

        .terms-agreement {
            display: flex;
            align-items: flex-start;
            margin: 1.5rem 0;
        }

        .terms-agreement input {
            margin-right: 8px;
            margin-top: 3px;
        }

        .terms-agreement label {
            font-size: 0.9rem;
            color: var(--gray-color);
            line-height: 1.5;
        }

        .terms-agreement a {
            color: var(--primary-color);
            text-decoration: none;
        }

        .terms-agreement a:hover {
            text-decoration: underline;
        }

        .login-link {
            text-align: center;
            margin-top: 1.5rem;
            font-size: 0.95rem;
            color: var(--gray-color);
        }

        .login-link a {
            color: var(--primary-color);
            text-decoration: none;
            font-weight: 500;
        }

        .login-link a:hover {
            text-decoration: underline;
        }

        .register-footer {
            margin-top: 2rem;
            text-align: center;
            font-size: 0.85rem;
            color: var(--gray-color);
        }

        .register-footer a {
            color: var(--primary-color);
            text-decoration: none;
        }

        @media (max-width: 768px) {
            .register-container {
                flex-direction: column;
                width: 90%;
                margin: 20px auto;
            }

            .register-left, .register-right {
                padding: 40px 30px;
            }

            .register-left::before, .register-left::after {
                display: none;
            }
        }
    </style>
</head>
<body>
    <div class="register-container">
        <div class="register-left">
            <h3 style="color: red">{{msg}}</h3>
            <h1>加入科技未来</h1>
            <p>注册您的员工账户，开始使用我们强大的企业平台和协作工具。</p>

            <div class="features-list">
                <div class="feature-item">
                    <div class="feature-icon">✓</div>
                    <span>访问所有内部系统和资源</span>
                </div>
                <div class="feature-item">
                    <div class="feature-icon">✓</div>
                    <span>与团队无缝协作</span>
                </div>
                <div class="feature-item">
                    <div class="feature-icon">✓</div>
                    <span>获取个性化工作空间</span>
                </div>
                <div class="feature-item">
                    <div class="feature-icon">✓</div>
                    <span>享受企业级安全保障</span>
                </div>
            </div>
        </div>
        <div class="register-right">
            <h2>创建账户</h2>
            <form action="/register" method="POST">
                <div class="form-group">
                    <label for="employee-id">员工ID <span style="color: #ef4444;">*</span></label>
                    <input type="text" id="employee-id" name="employee-id" class="form-control" placeholder="请输入您的员工ID" required>
                </div>

                <div class="form-group">
                    <label for="email">公司邮箱 <span style="color: #ef4444;">*</span></label>
                    <input type="email" id="email" name="email" class="form-control" placeholder="name@techfuture.com" required>
                </div>

                <div class="form-group">
                    <label for="fullname">全名 <span style="color: #ef4444;">*</span></label>
                    <input type="text" id="fullname" name="fullname" class="form-control" placeholder="请输入您的全名" required>
                </div>

                <div class="form-group">
                    <label for="department">部门 <span style="color: #ef4444;">*</span></label>
                    <select id="department" name="department" class="form-control" required>
                        <option value="" disabled selected>请选择您的部门</option>
                        <option value="rd">研发部</option>
                        <option value="product">产品部</option>
                        <option value="marketing">市场部</option>
                        <option value="sales">销售部</option>
                        <option value="hr">人力资源部</option>
                        <option value="finance">财务部</option>
                        <option value="it">IT支持部</option>
                    </select>
                </div>

                <div class="form-group">
                    <label for="password">设置密码 <span style="color: #ef4444;">*</span></label>
                    <input type="password" id="password" name="password" class="form-control" placeholder="至少8个字符" required>
                    <div class="password-strength">
                        <div class="strength-bar" id="strength-bar"></div>
                    </div>
                </div>

                <div class="form-group">
                    <label for="confirm-password">确认密码 <span style="color: #ef4444;">*</span></label>
                    <input type="password" id="confirm-password" name="confirm-password" class="form-control" placeholder="再次输入密码" required>
                </div>

                <div class="terms-agreement">
                    <input type="checkbox" id="terms" name="terms" required>
                    <label for="terms">我已阅读并同意<a href="#">服务条款</a>和<a href="#">隐私政策</a>，并理解我的数据将按照公司政策进行处理。</label>
                </div>

                <button type="submit" class="btn">注册账户</button>
            </form>

            <div class="login-link">
                已有账户? <a href="/login">立即登录</a>
            </div>

            <div class="register-footer">
                <p>© 2023 科技未来公司. 版权所有. | <a href="#">隐私政策</a> | <a href="#">使用条款</a></p>
                <p>需要帮助? 请联系HR部门: hr@techfuture.com</p>
            </div>
        </div>
    </div>

    <script>
        // 密码强度检测
        const passwordInput = document.getElementById('password');
        const strengthBar = document.getElementById('strength-bar');

        passwordInput.addEventListener('input', function() {
            const password = this.value;
            let strength = 0;

            // 长度检查
            if (password.length >= 8) strength += 1;
            if (password.length >= 12) strength += 1;

            // 复杂度检查
            if (/[A-Z]/.test(password)) strength += 1;
            if (/[0-9]/.test(password)) strength += 1;
            if (/[^A-Za-z0-9]/.test(password)) strength += 1;

            // 更新强度条
            switch(strength) {
                case 0:
                case 1:
                    strengthBar.style.width = '25%';
                    strengthBar.style.backgroundColor = '#ef4444'; // 红色
                    break;
                case 2:
                case 3:
                    strengthBar.style.width = '50%';
                    strengthBar.style.backgroundColor = '#f59e0b'; // 黄色
                    break;
                case 4:
                    strengthBar.style.width = '75%';
                    strengthBar.style.backgroundColor = '#10b981'; // 绿色
                    break;
                case 5:
                    strengthBar.style.width = '100%';
                    strengthBar.style.backgroundColor = '#10b981'; // 绿色
                    break;
                default:
                    strengthBar.style.width = '0%';
            }
        });
    </script>
</body>
</html>